package com.banach.prema.service;

import com.banach.prema.dto.cmd.ContactAdd;
import com.banach.prema.dto.cmd.ContactUpd;
import com.banach.prema.dto.vo.ContactVO;
import com.banach.prema.executor.ContactDeleteExe;
import com.banach.prema.executor.ContactQueryExe;
import com.banach.prema.executor.ContactSaveExe;
import com.ego.framework.dto.Response;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author ajun
 * @Desc
 * @Date 2025/8/13 15:44
 */
@Service
public class ContactService {
    @Resource
    private ContactQueryExe contactQueryExe;
    @Resource
    private ContactSaveExe contactSaveExe;
    @Resource
    private ContactDeleteExe contactDeleteExe;

    public Response<List<ContactVO>> selectList(){
        return contactQueryExe.selectList();
    }

    public Response create(ContactAdd contactAdd){
        return contactSaveExe.create(contactAdd);
    }

    public Response update(ContactUpd contactUpd){
        return contactSaveExe.update(contactUpd);
    }
    public Response delete(List<Long> ids){
        return contactDeleteExe.delete(ids);
    }
}
